import { groups } from '../../../api/user'

Page({
  data: {
    list: []
  },

  onLoad: function (options) {
    groups().then(res => {
      this.setData({
        list: res
      })
    })
  },

  toGroup(e) {
    wx.navigateTo({
      url: '/packageA/pages/contactsForGroup/contacts?groupId=' + e.currentTarget.dataset.id + '&name=' + e.currentTarget.dataset.name
    })
  }
})
